//
//  DWThemeTabBarView.swift
//  DWSwift
//
//  Created by GDL on 2025/6/20.
//

import Foundation
import SwiftUI

enum DWThemeTab: String, CaseIterable,Identifiable {
    case home = "house"
    case search = "magnifyingglass"
    case profile = "person"
    // 为每个 case 生成唯一 ID
    var id: UUID { UUID() }
    var title: String { rawValue.capitalized }
    var icon: String { rawValue }
}

struct DWThemeTabBarView: View {
    var body: some View {
        DWThemeTabContainer{ tab in
            switch tab {
            case .home: DWHomeView()
            case .search: ContentView()
            case .profile: DWProfileRefresherView()
            }
        }

    }
}


struct DWThemeTabBarView_Previews: PreviewProvider {
    static var previews: some View {
        DWThemeTabBarView()
    }
}
